package work.jame.blog.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import work.jame.blog.pojo.BlackList;
import work.jame.blog.mapper.BlackListMapper;
import work.jame.blog.service.BlackListService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author Jame
 * @since 2023-05-14
 */
@Service
public class BlackListServiceImpl extends ServiceImpl<BlackListMapper, BlackList> implements BlackListService {

    @Override
    public BlackList queryBlackListByIp(String ip) {
        QueryWrapper<BlackList> wrapper = new QueryWrapper<>();
        wrapper.eq("disable_ip", ip);
        return this.getOne(wrapper);
    }
}
